const menuList = {
  data: [{
    createTime: '2020-03-20 05:30:27',
    id: '1',
    menuName: '系统管理',
    parentId: '0',
    component: 'Layout',
    menuType: 'C',
    orderNum: '1',
    visible: '1',
    icon: 'system',
    children: []
  }, {
    createTime: '2020-03-20 05:30:27',
    id: '111',
    menuName: '用户管理',
    parentId: '1',
    orderNum: '1',
    icon: 'user',
    component: 'system/user/index',
    menuType: 'M',
    path: 'user',
    perms: 'system:user:list',
    visible: '1',
    children: []
  }, {
    createTime: '2020-03-20 05:30:27',
    id: '1111',
    menuName: '用户查询',
    parentId: '111',
    perms: 'system:user:query',
    menuType: 'B',
    orderNum: '1',
    icon: '',
    visible: '1',
    children: []
  }, {
    createTime: '2020-03-20 05:30:27',
    id: '1112',
    menuName: '用户修改',
    parentId: '111',
    perms: 'system:user:update',
    menuType: 'B',
    orderNum: '2',
    visible: '1',
    icon: '',
    children: []
  }, {
    createTime: '2020-03-20 05:30:27',
    id: '112',
    menuName: '角色管理',
    parentId: '1',
    orderNum: '2',
    component: 'system/role/index',
    menuType: 'M',
    perms: 'system:role:list',
    path: 'role',
    visible: '1',
    icon: 'eye',
    children: []
  }, {
    createTime: '2020-03-20 05:30:27',
    id: '113',
    menuName: '菜单管理',
    parentId: '1',
    orderNum: '3',
    component: 'system/menu/index',
    menuType: 'M',
    path: 'menu',
    perms: 'system:menu:list',
    visible: '1',
    icon: 'nested',
    children: []
  }, {
    createTime: '2020-03-20 05:30:27',
    id: '114',
    menuName: '字典管理',
    parentId: '1',
    orderNum: '4',
    component: 'system/dict/index',
    menuType: 'M',
    path: 'dict',
    perms: 'system:dict:list',
    visible: '1',
    icon: 'example',
    children: []
  }, {
    createTime: '2020-03-20 05:30:27',
    id: '115',
    menuName: '轮播图管理',
    parentId: '1',
    orderNum: '5',
    menuType: 'M',
    visible: '1',
    icon: 'link',
    children: []
  }, {
    createTime: '2020-03-20 05:30:27',
    id: '2',
    menuName: '系统监控',
    parentId: '0',
    menuType: 'C',
    orderNum: '2',
    visible: '1',
    icon: '',
    children: []
  }, {
    createTime: '2020-03-20 05:30:27',
    id: '211',
    menuName: '数据监控',
    parentId: '2',
    orderNum: '1',
    menuType: 'M',
    visible: '1',
    icon: '',
    children: []
  }, {
    createTime: '2020-03-20 05:30:27',
    id: '212',
    menuName: '服务监控',
    parentId: '2',
    orderNum: '2',
    menuType: 'M',
    visible: '1',
    icon: '',
    children: []
  }, {
    createTime: '2020-03-20 05:30:27',
    id: '3',
    menuName: '系统工具',
    parentId: '0',
    orderNum: '3',
    menuType: 'C',
    visible: '0',
    icon: '',
    children: []
  }]
}

const menuDetail = {
  data: {
    createTime: '2020-03-20 05:30:27',
    id: '111',
    menuName: '用户管理',
    parentId: '1',
    orderNum: '1',
    icon: 'user',
    component: 'system/user/index',
    menuType: 'M',
    path: 'user',
    perms: 'system:user:list',
    visible: '1',
    children: []
  }
}

const menuTreeSelect = {
  data: [{
    id: '1',
    label: '系统管理',
    children: [
      {
        id: '11',
        label: '用户管理',
        children: [
          {id:'111', label: '用户查询'},
          {id:'112', label: '用户添加'},
          {id:'113', label: '用户修改'},
          {id:'114', label: '用户删除'},
        ]
      }, {
        id: '12',
        label: '角色管理',
        children: [
          {id:'121', label: '角色查询'},
          {id:'122', label: '角色添加'},
          {id:'123', label: '角色修改'},
          {id:'124', label: '角色删除'},
        ]
      }, {
        id: '13',
        label: '菜单管理',
        children: [
          {id:'131', label: '菜单查询'},
          {id:'132', label: '菜单添加'},
          {id:'133', label: '菜单修改'},
          {id:'134', label: '菜单删除'},
        ]
      }
    ]
  }, {
      id: '2',
      label: '系统监控'
    }, {
      id: '3',
      label: '系统工具'
    }
  ]
}

const roleMenuTreeSelect = {
  checkedKeys: ['112','113','122','123'],
  menus: [{
    id: '1',
    label: '系统管理',
    children: [
      {
        id: '11',
        label: '用户管理',
        children: [
          {id:'111', label: '用户查询'},
          {id:'112', label: '用户添加'},
          {id:'113', label: '用户修改'},
          {id:'114', label: '用户删除'},
        ]
      }, {
        id: '12',
        label: '角色管理',
        children: [
          {id:'121', label: '角色查询'},
          {id:'122', label: '角色添加'},
          {id:'123', label: '角色修改'},
          {id:'124', label: '角色删除'},
        ]
      }, {
        id: '13',
        label: '菜单管理',
        children: [
          {id:'131', label: '菜单查询'},
          {id:'132', label: '菜单添加'},
          {id:'133', label: '菜单修改'},
          {id:'134', label: '菜单删除'},
        ]
      }
    ]
  }, {
      id: '2',
      label: '系统监控'
    }, {
      id: '3',
      label: '系统工具'
    }
  ]
}


module.exports = [
  // menu查询所有
  {
    url: '/system/menu/list',
    type: 'get',
    response: config => {
      return {
        code: 200,
        message: '操作成功',
        total: 6,
        data: menuList.data
      }
    }
  },
  // {
  //   url: '/system/menu\.*',
  //   type: 'get',
  //   response: config => {
  //     return {
  //       code: 200,
  //       message: '操作成功',
  //       data: menuDetail.data
  //     }
  //   }
  // },
  {
    url: '/system/menu\.*',
    type: 'delete',
    response: config => {
      return {
        code: 200,
        message: '操作成功'
      }
    }
  },
  {
    url: '/system/menu/getTreeSelect',
    type: 'get',
    response: config => {
      return {
        code: 200,
        message: '操作成功',
        data: menuTreeSelect.data
      }
    }
  },
  {
    url: '/system/menu/getRoleMenuTreeSelect\.*',
    type: 'get',
    response: config => {
      return {
        code: 200,
        message: '操作成功',
        data: roleMenuTreeSelect
      }
    }
  }
]
